package com.zmsk.zmio.handler;

import android.content.Context;

import com.softwinner.Gpio;
import com.zmsk.zmio.inter.IIOHandler;

public class ZC83AHandler implements IIOHandler {

    public ZC83AHandler() {
        Gpio.setMulSel('E', 14, 1);
        Gpio.setMulSel('E', 15, 1);
        Gpio.setMulSel('E', 16, 1);
    }

    @Override
    public void initIOControl(Context context) {

    }

    @Override
    public void stopIOControl(Context context) {

    }

    @Override
    public void noticeGateOpen(Context context, String idNumber) {
        Gpio.writeGpio('E', 16, 1);
    }

    @Override
    public void noticeGateClose(Context context) {
        Gpio.writeGpio('E', 16, 0);
    }

    @Override
    public void noticeWhiteLedOn(Context context) {

    }

    @Override
    public void noticeWhiteLedOff(Context context) {

    }

    @Override
    public void noticeInfraredLedOn(Context context) {

    }

    @Override
    public void noticeInfraredLedOff(Context context) {

    }

    @Override
    public void noticeRedLedOn(Context context) {
        Gpio.writeGpio('E', 14, 1);
    }

    @Override
    public void noticeRedLedOff(Context context) {
        Gpio.writeGpio('E', 14, 0);
    }

    @Override
    public void noticeGreenLedOn(Context context) {
        Gpio.writeGpio('E', 15, 1);

    }

    @Override
    public void noticeGreenLedOff(Context context) {
        Gpio.writeGpio('E', 15, 0);
    }

    @Override
    public void handleSlientInstall(String path) {

    }
}
